/**
 * Created by liubin on 2014/12/01.
 * 提示信息
 */
define(['app', 'notification'], function (app) {
    return app.factory('NotificationService', function () {
        var alert = function (color, icon, title, content, number, timeout, callback) {
            $.bigBox({
                title: title,
                content: content,
                color: color,
                icon: icon,
                number: number,
                timeout: timeout
            }, function () {
                if (callback) {
                    callback();
                }
            });
        }

        return {
            // number 和 timeout 不用时传null
            /**
             * 提示用
             * @param title
             * @param content
             * @param number
             * @param timeout
             * @param callback
             */
            bell: function (title, content, number, timeout, callback) {
                alert('#3276B1', 'fa fa-bell swing animated', title, content, number, timeout, callback);
            },
            /**
             * 执行成功用
             * @param title
             * @param content
             * @param number
             * @param timeout
             * @param callback
             */
            success: function (title, content, number, timeout, callback) {
                alert('#739E73', 'fa fa-check swing animated', title, content, number, timeout, callback);
            },
            /**
             * 图标为盾，警醒类？
             * @param title
             * @param content
             * @param number
             * @param timeout
             * @param callback
             */
            shield: function (title, content, number, timeout, callback) {
                alert('#C79121', 'fa fa-shield swing animated', title, content, number, timeout, callback);
            },
            /**
             * 错误提示用
             * @param title
             * @param content
             * @param number
             * @param timeout
             * @param callback
             */
            warning: function (title, content, number, timeout, callback) {
                alert('#C46A69', 'fa fa-warning swing animated', title, content, number, timeout, callback);
            },
            clear: function(){
                $("#divbigBoxes").empty();
                $('#divMiniIcons').empty();
            }
        }
    });

});